/* 
 * FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
 * Copyright (c) 2006 Christian Walter <wolti@sil.at>
 * All rights reserved.
 *
 */

#ifndef _MB_APP_H
#define _MB_APP_H

#include "mbdef.h"
#include "mbport.h"
#include "mbdatacb.h"
#include "mbcrc.h"
#include "mbslave.h"
#include "mbmaster.h"
#include "mbinputdatacfg.h"


#ifdef   _MAPP_MODULE_
#define  MAPP_EXT
#else
#define  MAPP_EXT  extern
#endif

#define MBAPP_COM1_EVENT_RTUEND                0x01
#define MBAPP_COM1_EVENT_TIMEOUT               0x02
#define MBAPP_COM2_EVENT_RTUEND                0x04
#define MBAPP_COM2_EVENT_TIMEOUT               0x08
#define MBAPP_COM3_EVENT_RTUEND                0x10
#define MBAPP_COM3_EVENT_TIMEOUT               0x20
    
#define MBAPP_EVENT_MSK \
(MBAPP_COM1_EVENT_RTUEND\
|MBAPP_COM1_EVENT_TIMEOUT\
|MBAPP_COM2_EVENT_RTUEND\
|MBAPP_COM2_EVENT_TIMEOUT\
|MBAPP_COM3_EVENT_RTUEND\
|MBAPP_COM3_EVENT_TIMEOUT\
)

#undef MAPP_EXT

#endif
